{% extends './base.html' %}
{% block content %}
<article class="media content-section">
    <img class="rounded-circle article-img" src="{{ object.author.profile.image.url }}">
    <div class="media-body">
        <div class="article-metadata">
            <a class="mr-2" href="{% url 'user-posts' object.author.username %}">{{ object.author }}</a>
            <small class="text-muted">{{ object.date_posted | date:"F m, Y"}}</small>
            <div>
                {% if object.author == user %}
                <a class="btn btn-secondary btn-sm mt-1 mb-1" href="{% url 'post-update' object.id %}">Update</a>
                <a class="btn btn-sm btn-danger mt-1 mb-1" href="{% url 'post-delete' object.id %}">Delete</a>
                {% endif %}
            </div>
        </div>
        <h2 class="article-title">{{ object.title }}</h2>
        <p class="article-content">{{ object.content }}</p>
    </div>
</article>
{% endblock content%}